import request from '@/utils/http'

const imService = {
 //登录
  //登录后门
  backdoor(params) {
    return request({
      url: '/wxpub/app/backdoor',
      method: 'get',
      params: params
    })
  },
  getUserSig() {
    return request({
      url: '/ban/Im/user_sig',
      method: 'get'
    })
  },
  // 管理员在群聊中撤回某个用户的消息
  recallMemberMsg(params) {
    return request({
      url: '/ban/im/group_msg_recall',
      method: 'post',
      data: params
    })
  },
  //查询群历史消息
  getGroupHistoryMsg(params) {
    return request({
      url: '/ban/im/group_history_msg',
      method: 'get',
      params: params
    })
  },
   //查询私聊历史消息
   getPrivateHistoryMsg(params) {
    return request({
      url: '/ban/im/ctoc_history_msg',
      method: 'get',
      params: params
    })
  },
   //通过腾讯identifier获取用户已加入的班级信息 --yyq
   getUserBanMsg(params) {
    return request({
      url: '/ban/ban/identifier_ban',
      method: 'get',
      params: params
    })
  },
  // 通过腾讯identifier获取用户学号 -- yyq
   getUserStudyNum(params) {
    return request({
      url: '/ban/ban/identifier_user',
      method: 'get',
      params: params
    })
  },
  // 用户查询单聊对象是否设置免打扰
  getUserNotDisturbStatus(params) {
    return request({
      url: '/ban/im/user_group_not_disturb_status',
      method: 'get',
      params: params
    })
  },
   // 获取班级列表
   getClassList() {
    return request({
      url: '/ban/ban_member/admin_ban_list',
      method: 'get',
    })
  },
   //判断用户是否是班级老师 
   checkIsTeacher() {
    return request({
      url: '/ban/ban_member/is_admin',
      method: 'get',
    })
  },
  //获取当前连接状态
  getConnectStatus(params) {
    return request({
      url: '/ban/im/query_state',
      method: 'get',
      params: params
    })
  },
}
export default imService
